package org.misty.scalafx.first

import scalafx.application.JFXApp
import scalafx.application.JFXApp.PrimaryStage
import scalafx.scene.Scene
import scalafx.scene.control.Label
import scalafx.scene.layout.StackPane

/**
 * Created by Misty on 2015/6/9.
 */
object ScalaFXApp extends JFXApp {
    var end = 0L

    stage = new PrimaryStage {
        title.value = "ScalaFX Application"
        width = 400
        height = 300
        scene = new Scene {
            root = new StackPane {
                children = new Label("Loading")
            }
        }
    }

    override def main(args: Array[String]) {
        val start = System.currentTimeMillis()
        delayedInit {
            end = System.currentTimeMillis()
            val total = end - start
            println(total)
        }
        super.main(args)
    }
}
